package com.athu.study.controller;

import com.athu.study.service.ChatAssistant;
import dev.langchain4j.model.chat.ChatModel;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class HighApiController {

    @Resource
    private ChatAssistant chatAssistant;
    @GetMapping(value = "/highapi/api01")
    public String highApi(@RequestParam(value = "prompt")String prompt){
        return chatAssistant.chat(prompt);
    }
}
